package com.netease.k;

import java.io.File;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicLong;

public class b
  implements Runnable
{
  boolean a;
  boolean b;
  long c;

  public b(e parame)
  {
    this(parame, 345600000L);
  }

  public b(e parame, long paramLong)
  {
    this.c = paramLong;
  }

  public b(e parame, long paramLong, boolean paramBoolean)
  {
    this.c = paramLong;
    this.b = paramBoolean;
  }

  public void a()
  {
    this.a = true;
  }

  public void run()
  {
    long l = 0L;
    int i = 0;
    File localFile1 = new File(e.a(this.d));
    String[] arrayOfString;
    int j;
    if (localFile1.exists())
    {
      arrayOfString = localFile1.list();
      if ((arrayOfString != null) && (arrayOfString.length > 0))
      {
        j = arrayOfString.length;
        if ((!this.b) || (this.c <= l))
          break label197;
        int n = 0;
        if ((!this.a) && (i < j))
        {
          File localFile4 = new File(localFile1, arrayOfString[i]);
          if (localFile4.lastModified() > this.c);
          while (true)
          {
            i++;
            break;
            n++;
            l += localFile4.length();
            if (localFile4.exists())
              this.d.b(localFile4);
            arrayOfString[i] = null;
          }
        }
        if (this.d.a != null)
          this.d.a.b(e.a(this.d), l, this.c);
      }
    }
    label405: 
    while (true)
    {
      e.a(this.d, this);
      return;
      label197: d[] arrayOfd = new d[j];
      for (int k = 0; k < arrayOfd.length; k++)
      {
        File localFile2 = new File(localFile1, arrayOfString[k]);
        arrayOfd[k] = new d(arrayOfString[k], localFile2.lastModified());
      }
      Arrays.sort(arrayOfd);
      int m = 0;
      while (true)
      {
        if ((this.a) || (i >= j))
          break label405;
        File localFile3 = new File(localFile1, arrayOfd[i].a);
        m++;
        l += localFile3.length();
        if (localFile3.exists())
        {
          this.c = localFile3.lastModified();
          this.d.b(localFile3);
        }
        if (e.b(this.d).get() << 1 <= e.c(this.d))
        {
          if (this.d.a == null)
            break;
          this.d.a.b(e.a(this.d), l, this.c);
          break;
        }
        arrayOfd[i] = null;
        i++;
      }
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.k.b
 * JD-Core Version:    0.6.0
 */